#include <math.h>

class Vector {
public:
	float x;
	float y;
public:
	Vector(float Ix, float Iy) : x(Ix), y(Iy)
	{}

	Vector operator + (const Vector& V) const { return Vector( x + V.x, y + V.y);}

	Vector operator - (const Vector& V) const { return Vector( x + V.x, y + V.y); }

	Vector& operator *= (const float scalar) { x *= scalar; y *= scalar; return *this;}

	float operator *  (const Vector& V) const { return ( x * V.x ) + ( y * V.y ); } //dot product

	float getLength() const { return (float)sqrt( x*x + y*y);}

	float normalise() {
		float length = getLength();
		
		(*this) *= (1.0f/length);

		return length;
	}
	
};